package fms.msgupcenter.protocols.uplinkack;

/**
 * Created with IntelliJ IDEA.
 * User: adcc
 * Date: 14-6-10
 * Time: 下午1:24
 * To change this template use File | Settings | File Templates.
 */

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;

/**
 *  上行回复协议内容头
 */
@XmlAccessorType(XmlAccessType.FIELD)
public class UplinkAckHead {

    @XmlAttribute(name="appUpMsgId")
    private String appUpMsgId;    // 对应于上行报文的ID( 同上行报文协议中的含义及值相同)
    @XmlAttribute(name="an")
    private String an;         // 机尾号
    @XmlAttribute(name="fi")
    private String fi;             // 航班号
    @XmlAttribute(name="destination")
    private String destination;
    @XmlAttribute(name="signature")
    private String signature;
    @XmlAttribute(name="smi")
    private String smi;
    @XmlAttribute(name="dsp")
    private String dsp;
    @XmlAttribute(name="rgs")
    private String rgs;
    @XmlAttribute(name="rgsTime")
    private String rgstime;
    @XmlAttribute(name="msn")
    private String msn;
    @XmlAttribute(name="maNum")
    private String manum;
    // 上行回复的类型 (同上行报文协议中的含义及值相同)
    // “AUTO”飞机自动回复
    // “MANU”手动回复(一般是机长来手动触发)
    @XmlAttribute(name="ackType")
    private String acktype;
    @XmlAttribute(name="state")
    private int state;     // 回复的状态

    @XmlAttribute(name="errorCode")
    private String errorcode;      // 下行回复报文中的错误代码
    private String errormsg;
    @XmlAttribute(name="tag")
    private String tag;         // 用户自定义数据(同上行报文协议中的含义及值相同)
    @XmlAttribute(name="appname")
    private String appname;     // 上行报文协议中的上传应用类型名称( 同上行报文协议中的含义及值相同)
    @XmlAttribute(name="appUpMsgType")
    private String appUpMsgType;   // 报文类型

    @XmlAttribute(name="upsender")
    private String upsender;      // 该回复对应的上行发送的方式

    public UplinkAckHead(){
        this.appUpMsgId = "";
        this.an = "";
        this.fi = "";
        this.destination = "";
        this.signature = "";
        this.smi = "";
        this.dsp = "";
        this.rgs = "";
        this.rgstime = "";
        this.msn = "";
        this.manum = "";
        this.acktype = "";
        this.state = 0;
        this.errorcode = "";
        this.errormsg = "";
        this.tag = "";
        this.appname = "";
        this.appUpMsgType = "";
        this.upsender = "";
    }

    public UplinkAckHead(
            String appUpMsgId,
            String an,
            String fi,
            String rcvaddress,
            String sndaddress,
            String smi,
            String dsp,
            String rgs,
            String rgstime,
            String msn,
            String manum,
            String acktype,
            int state,
            String errorcode,
            String errormsg,
            String tag,
            String appname,
            String appUpMsgType,
            String upsender)
    {
        this.appUpMsgId = appUpMsgId;
        this.an = an;
        this.fi = fi;
        this.destination = rcvaddress;
        this.signature = sndaddress;
        this.smi = smi;
        this.dsp = dsp;
        this.rgs = rgs;
        this.rgstime = rgstime;
        this.msn = msn;
        this.manum = manum;
        this.acktype = acktype;
        this.state = state;
        this.errorcode = errorcode;
        this.errormsg = errormsg;
        this.tag = tag;
        this.appname = appname;
        this.appUpMsgType = appUpMsgType;
        this.upsender = upsender;
    }

    public String getAppUpMsgId() {
        return appUpMsgId;
    }

    public void setAppUpMsgId(String appUpMsgId) {
        this.appUpMsgId = appUpMsgId;
    }

    public String getAn() {
        return an;
    }

    public void setAn(String an) {
        this.an = an;
    }

    public String getFi() {
        return fi;
    }

    public void setFi(String fi) {
        this.fi = fi;
    }

    public String getDestination() {
        return destination;
    }

    public void setDestination(String destination) {
        this.destination = destination;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public String getSmi() {
        return smi;
    }

    public void setSmi(String smi) {
        this.smi = smi;
    }

    public String getDsp() {
        return dsp;
    }

    public void setDsp(String dsp) {
        this.dsp = dsp;
    }

    public String getRgs() {
        return rgs;
    }

    public void setRgs(String rgs) {
        this.rgs = rgs;
    }

    public String getRgstime() {
        return rgstime;
    }

    public void setRgstime(String rgstime) {
        this.rgstime = rgstime;
    }

    public String getMsn() {
        return msn;
    }

    public void setMsn(String msn) {
        this.msn = msn;
    }

    public String getManum() {
        return manum;
    }

    public void setManum(String manum) {
        this.manum = manum;
    }

    public String getAcktype() {
        return acktype;
    }

    public void setAcktype(String acktype) {
        this.acktype = acktype;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getErrorcode() {
        return errorcode;
    }

    public void setErrorcode(String errorcode) {
        this.errorcode = errorcode;
    }

    public String getErrormsg() {
        return errormsg;
    }

    public void setErrormsg(String errormsg) {
        this.errormsg = errormsg;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getAppname() {
        return appname;
    }

    public void setAppname(String appname) {
        this.appname = appname;
    }

    public String getAppUpMsgType() {
        return appUpMsgType;
    }

    public void setAppUpMsgType(String appUpMsgType) {
        this.appUpMsgType = appUpMsgType;
    }

    public String getUpsender() {
        return upsender;
    }

    public void setUpsender(String upsender) {
        this.upsender = upsender;
    }
}
